# -*- coding: utf-8 -*-
"""
@Time : 2023/6/4 12:51
@Author : Gremore
@File : api
@Des: api路由
"""

from fastapi import APIRouter
from fastapp.api.endpoints.test import test_oath2, say_hello, test_redis_depends,\
    test_redis, test_readdb
from fastapp.api.endpoints import user, role, access, websocket
from fastapp.api.extends import sms, wechat, cos

api_router = APIRouter(prefix="/pyapi/v1")
api_router.post("/test/oath2", tags=["测试oath2授权"])(test_oath2)
api_router.include_router(user.router, prefix='/admin', tags=["用户管理"])
api_router.include_router(role.router, prefix='/admin', tags=["角色管理"])
api_router.include_router(access.router, prefix='/admin', tags=["权限管理"])
api_router.include_router(websocket.router, prefix='/ws', tags=["WebSocket"])
api_router.include_router(wechat.router, prefix='/wechat', tags=["微信授权"])
api_router.include_router(sms.router, prefix='/sms', tags=["短信接口"])
api_router.include_router(cos.router, prefix='/cos', tags=["对象存储接口"])
api_router.get("/test/hello", tags=["测试"])(say_hello)

api_router.post("/test/redis/depends", tags=["测试"])(test_redis_depends)
api_router.post("/test/redis", tags=["测试"])(test_redis)
api_router.get("/test/getfromdb", tags=["测试"])(test_readdb)


